home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: richrug@ix.netcom.com(RICHARD RUGANI)
- Newsgroups: comp.lang.c
- Subject: Re: *** Need help ASAP *** CLS, LOCATE, etc do not work with Borland 3.1 for dos
- Date: 3 Mar 1996 03:46:15 GMT
- Organization: Netcom
- Message-ID: <4hb4m7$b56@dfw-ixnews1.ix.netcom.com>
- References: <4h96ne$3nb@fountain.mindlink.net>
- NNTP-Posting-Host: den-co9-09.ix.netcom.com
- X-NETCOM-Date: Sat Mar 02 9:46:15 PM CST 1996
-
- In <4h96ne$3nb@fountain.mindlink.net> mike_huwe@mindlink.bc.ca (Mike
- Huwe) writes:
- >
- >I am using Borland C++ 3.1. When I run simple programs that clear the
- >screen or use the LOCATE command, they don't work. for example,
-
- Borland C provides a function for clearing the screen, and a function
- for locating the cursor:
-
- clrscr() clears the screen
- gotoxy(x,y) locates the cursor at column x, line y
-
- and then there's:
-
- getch() halts the program until the user strikes a key
-
- Try this:
-
- #include <stdio.h>
- #include <conio.h>
- int main(void)
- {
- clrscr(); /* clear the screen */
- printf("This is column 1, line 1");
- gotoxy(40,10); /* cursor at column 40, line 10 */
- printf("This is column 40, line 10");
- gotoxy(60,24); /* cursor at column 60, line 24 */
- printf("Hit any key");
- getch(); /* program waits for keystrike */
- return 0;
- }
-
-